<script type="text/javascript" >
    jQuery(document).ready(function() {
        stFlickrToolbox.sortColumn();
        stFlickrToolbox.shortAction();
    });
</script>
<div class="w100p bgl">
    <div class="w100p bgr">
        <div class="inner_container galleryFlickr">
            <br />
            <table class="widefat galleryVideo" cellspacing="0">
                <thead>
                    <tr>
                        <?php print_column_headers('stFlickrToolbox_st_flickr_set'); ?>
                    </tr>
                </thead>


                <tbody>
                    <?php
                        if (count($results) > 0) {
                            $tr_class = "";
                            foreach ($results as $result) {
                                if (empty($tr_class) || $tr_class == "class='bg_gray2'") {
                                    $tr_class = "class='bg_gray1'";
                                } else {
                                    $tr_class = "class='bg_gray2'";
                                }
                                $series = explode('|*|', $result->series);
                                echo "<tr id='$result->id' $tr_class>"
                                //. "<td>" . $result->id . "</td>"
                                . "<td ><div class='pos_rel'>" . stFlickrToolboxFunctions::limitWords($result->title, 5)
                                . "<div class=\"row-actions short_action\">"
                                . "<span action='flickrSetEdit' short_action='' id='$result->id'>Edit | </span>"
                                . "<span action='flickrPhotostream' short_action='show_photo' id='$result->id'>Show photos | </span>"
                                . "<span class='trash' short_action='delete' id='$result->id' confirm='Are you sure you want to delete this video?'>Trash </span>"
                                . "</div></div>"
                                . "</td>"
                                //. "<td>" . stFlickrToolboxFunctions::limitWords($result->title, 5) . "</td>"
                                . "<td>" . stFlickrToolboxFunctions::limitWords($result->description, 15) . "</td>"
                                . "<td align='center'>"
                                . "<img height='70' src='http://farm{$series[2]}.static.flickr.com/{$series[1]}/{$result->primary}_{$series[0]}_m.jpg' alt='' />"
                                . "</td>"
                                //. "<td>" . $result->category . "</td>"
                                //. "<td>" . stFlickrToolboxFunctions::limitWords(str_replace('|*|', ', ', $result->tag), 5) . "</td>"
                                //. "<td>" . $result->duration . "</td>"
                                //. "<td>" . $result->view_count . "</td>"
                                //. "<td>" . $result->playlist_name . "</td>"
                                . "</tr>"
                                ;
                            }
                        }
                    ?>
                    </tbody>
                </table>
                <div class="page_d">
                <?php echo $pagination ?>
                <div class="cl"></div>
            </div>

        </div>
    </div>
</div>